const fs = require('fs');

const basePath = `${process.root}/util`;
const fileList = fs.readdirSync(basePath).filter(item => item !== 'index.js' && item.includes('.js'));

const utils = {};
fileList.forEach(item => {
  const temp = item.replace('.js', '');
  utils[temp] = require(`${basePath}/${temp}`);
})

module.exports = utils;